File systems typically provide access to data using a page cache stored in a main memory of a host, such as in a Dynamic Random Access Memory (DRAM). The page cache can provide a sequence of memory pages used for caching some part of the file system's object content. In more detail, the page cache can be used for caching user data as well as for metadata in a kernel space of an operating system executed by a host. This typically provides quicker access to the cached data for reading and writing than accessing the data from a Data Storage Device (DSD), such as a Hard Disk Drive (HDD) or Solid-State Drive (SSD).
Although the use of a page cache for accessing data may work well for conventional storage memory such as a rotating magnetic disk in an HDD or a NAND flash memory in an SSD, the use of a page cache for accessing data can be inefficient for DSDs that include more recently developed Storage Class Memories (SCMs) due to the quicker access times of such SCMs and the operations required for the page cache. Emerging SCMs can include, for example, Phase Change Memory (PCM), Magnetoresistive Random Access Memory (MRAM), or Resistive RAM (RRAM) that can perform read and write operations much faster than conventional memories such as a rotating magnetic disk or a NAND flash memory, and in some cases, even faster than a main memory such as DRAM.
For example, a DRAM main memory may have a read latency of 50 nanoseconds for reading data and a write latency of 50 nanoseconds for writing data. Given that a read latency for a NAND flash secondary memory may be 25 microseconds and a write latency for the NAND flash secondary memory may be 500 microseconds, the use of a page cache in a DRAM main memory in such an example can provide a quicker access of the cached data. The cost of maintaining and operating a page cache in DRAM, such as loading and flushing pages of data between the DRAM main memory and a conventional secondary memory, such as a NAND flash memory, is outweighed by the quicker access time of the DRAM main memory as compared to the secondary memory.
As noted above, emerging SCMs have data access times significantly faster than conventional memories. For example, an MRAM SCM may have a read latency of 30 nanoseconds and a write latency of 30 nanoseconds. Other emerging SCMs such as RRAM may provide for even faster access times with a read latency of only 3 nanoseconds and a write latency of only 10 nanoseconds.
Despite these quicker access times for SCMs, accessing data from a DSD with a SCM can still take microseconds due to processing by the DSD and/or the host relating to the fixed block or page size currently used to access data. This fixed block or page size may be based on, for example, a smallest writable unit of a secondary memory of the DSD, such as a 512 byte sector size or a 4 KB page size. Accordingly, there is a need for a more efficient way to access data from DSDs that include SCMs to make better use of the faster access times of SCMs. Such DSDs can include, for example, hybrid SSDs that have both an SCM and a conventional memory such as a NAND flash memory.